There are seven mouse actions

you can add these to any program that "extends WindowController"
  • public void onMousePress ( Location point ) ---> When you press down on the mouse
  • public void onMouseRelease ( Location point ) ---> When you release the mouse button
  • public void onMouseClick ( Location point ) ---> When you click the mouse
  • public void onMouseMove ( Location point ) ---> When the mouse is moved
  • public void onMouseDrag ( Location point ) ---> When the mouse is moved while clicked
  • public void onMouseEnter ( Location point ) ---> When the mouse enters the screen
  • public void onMouseExit ( Location point ) ---> When the mouse exits the screen

When an even occurs, Java makes the name point refer to the current mouse coordinates.

It then runs the instructions in the appropiate method
Only if that method's actually there
If not, nothing special happens